package com.shuyun;

/**
 * @description:
 * @author: shuai.chen@shuyun.com
 * @date: 2023/1/19 9:41 AM
 */
public class FunctionAsParamTest {

    public static void main(String[] args) {

        doIt(() -> System.out.println("eat"));


        doIt(() -> System.out.println("drink"));

    }

    public static void doIt(Caller caller){
        caller.execute();
    }

}

interface Caller {

    void execute();

}

